#pragma once
#include "Thread.h"
#include <memory>
#include "../DataModule/HanaData.h"
#include "Config.h"

class SyncData;
class EnclaveProvider;

class SyncWriteDataThread :	public Thread
{
public:
	SyncWriteDataThread(SyncData *sync_data, Config *config, std::shared_ptr<EnclaveProvider> &enclave_provider);
	virtual ~SyncWriteDataThread();

	virtual bool runLoop() override;

private:
	std::shared_ptr<EnclaveProvider> enclave_provider_;

	SyncData *sync_data_;

	Config *config_;

	HanaData hana_data_;

	IData::Fields fields_;

	int value_buf_len = 5120;
	char *value_buf;

	int buf_len = 10240;
	char *buf;
};

